<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>软件工程专业</title>
    <link th:href="@{/img/Bandit.ico}" rel="icon">
    <link th:href="@{/layui/css/layui.css}" rel="stylesheet">
    <link th:href="@{/css/public.css}" rel="stylesheet">
    <link th:href="@{/css/frontIndex.css}" rel="stylesheet">
    <style>
        .layui-card-header{
            border: #0D3349 2px solid;
            border-radius: 2px;
        }
        .layui-card-body{
            border: #2c2c2c 2px solid;
            border-radius: 2px;
        }
    </style>
</head>
<body>
<!--头-->
<div th:replace="~{commons/common::MyHeader}"></div>
<!--轮播图-->
<div class="layui-show-lg-block">
    <div class="layui-carousel" id="MyCarousel">
        <div carousel-item>
            <img class="img" src="https://gitee.com/lds0826/blog-image/raw/master/webImg/202112061415501.jpg">
            <img class="img" src="https://gitee.com/lds0826/blog-image/raw/master/webImg/202112061415500.jpg">
            <img class="img" src="https://icec.nefu.edu.cn/images/ba.png">
            <img class="img" src="https://icec.nefu.edu.cn/__local/6/48/84/0BC083260D9D1143EA676C75AEB_572CF3B6_C969E.png">
        </div>
    </div>
</div>
<!--主内容-->
<div class="layui-main" style="padding-top: 20px">
    <div class="layui-row layui-col-space8">
        <!--正文部分-->
        <div class="layui-show-lg-block layui-row layui-col-space10">
            <!--左侧内容-->
            <div class="layui-col-lg4">
                <div class="layui-card">
                    <div class="layui-card-header"><h1 style="text-align: center;">专业介绍</h1></div>
                    <div class="layui-card-body" th:each="majorInfo:${MajorList}">
                        <p th:text="${majorInfo.msgInfo}" style="text-indent: 2em;text-align: justify"></p>
                    </div>
                </div>

                <div class="layui-card">
                    <div class="layui-card-header"><h1>快捷入口</h1></div>
                    <div class="layui-card-body">
                        <div class="layui-btn-container">
                           <a target="_blank" class="layui-btn layui-btn-primary" href="https://jwc.nefu.edu.cn/">教务在线</a>
                           <a target="_blank" class="layui-btn layui-btn-primary" href="https://icec.nefu.edu.cn/">学院官网</a>
                           <a target="_blank" class="layui-btn layui-btn-primary" href="https://acm.webvpn.nefu.edu.cn/">ACM平台</a>
                        </div>

                    </div>
                </div>
            </div>
            <!--右侧-->
            <div class="layui-col-lg8 layui-col-space8">
                <!--新闻-->
                <div class="layui-col-lg12">
                    <div class="layui-card">
                    <div class="layui-card-header">
                        <a th:href="@{/front/message/list/}+${MSG_TYPE_NEWS}">新闻</a>
                    </div>
                    <div class="layui-card-body message-card-body">
                        <ul>
                            <li style="margin: 2px" th:each="News,NewsStat:${NewsList}">
                                <div class="message">
                                    <div class="message-body">
                                        <span th:text="${NewsStat.index+1}" th:class="${NewsStat.index<3?'layui-badge':'layui-badge layui-bg-cyan'}"></span>
                                        <a th:text="${News.msgTitle}" th:href="@{/front/toMsgDetails?msgID=}+${News.msgID}"></a>
                                    </div>
                                    <div class="message-time">
                                        <p th:text="${#dates.format(News.releaseDate,'yyyy-MM-dd')}"></p>
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </div>
                    </div>
                </div>
                <!--公告-->
                <div class="layui-col-lg12">
                    <div class="layui-card">
                    <div class="layui-card-header">
                        <a th:href="@{/front/message/list/}+${MSG_TYPE_NOTICES}">公告</a>
                    </div>
                    <div class="layui-card-body message-card-body">
                        <ul>
                            <li th:each="notice,noticeStat:${NoticeList}">
                                <div class="message">
                                <div class="message-body">
                                    <span th:text="${noticeStat.index+1}" th:class="${noticeStat.index<3?'layui-badge':'layui-badge layui-bg-cyan'}"></span>
                                    <a th:text="${notice.msgTitle}" th:href="@{/front/toMsgDetails?msgID=}+${notice.msgID}"></a>
                                </div>

                                <div class="message-time">
                                    <p th:text="${#dates.format(notice.releaseDate,'yyyy-MM-dd')}"></p>
                                </div>
                                </div>
                            </li>
                        </ul>
                    </div>
                    </div>
                </div>
                <!--就业信息-->
                <div class="layui-col-lg12">
                    <div class="layui-card">
                        <div class="layui-card-header">
                            <a th:href="@{/front/message/list/}+${MSG_TYPE_JOBS}">就业指南</a>
                        </div>
                        <div class="layui-card-body message-card-body">
                            <ul>
                                <li th:each="job,jobStat:${JobsList}">
                                    <div class="message">
                                        <div class="message-body">
                                            <span th:text="${jobStat.index+1}" th:class="${jobStat.index<3?'layui-badge':'layui-badge layui-bg-cyan'}"></span>
                                            <a th:text="${job.msgTitle}" th:href="@{/front/toMsgDetails?msgID=}+${job.msgID}"></a>
                                        </div>

                                        <div class="message-time">
                                            <p th:text="${#dates.format(job.releaseDate,'yyyy-MM-dd')}"></p>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>
<!--尾-->
<div class="layui-footer footer-bg">
    <div class="footer-container">
        <p>东北林业大学信息与计算机工程学院</p>
        <p> ©版权所有 2021 </p>
    </div>
</div>

<div th:replace="~{commons/common::pubScript}"></div>
<script>
    layui.use(['carousel','layer'], function(){
        var carousel = layui.carousel;
        var layer = layui.layer;
        var i = 0;
        var height = $(".img")[i].height //获取图片高度
        //建造实例
        ins=carousel.render({
            elem: '#MyCarousel'
            ,width: '100%' //设置容器宽度
            ,height:height
            //,anim: 'updown' //切换动画方式
            ,interval: 3000
            ,anim: 'fade'

        });
        re(ins,i);
        carousel.on('change(carofilter)', function(obj){
            i = obj.index
            re(ins, i)
        });
    });
    function re(ins, i){
        // var width = $(".img")[i].width
        var height = $(".img")[i].height
        ins.reload({
            elem: '#MyCarousel'
            ,width: '100%' //设置容器宽度
            ,height:height
            //,anim: 'updown' //切换动画方式
            ,interval: 3000
            ,anim: 'fade'
        });
    }
</script>
</body>
</html>